package com.wwd;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import com.wwd.common.annotation.Lockable;

@Component
public class Building {
	
	Logger logger = LoggerFactory.getLogger(Building.class);
	
	@Lockable(keys= {"welcome","byebye"},expiration=15,retry=2)
	public void build(String name,String status) {
		try {
			Thread.sleep(4000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		logger.info(name+" "+status);
	}

}
